package com.xja.ssm.service.impl;

import com.xja.ssm.entity.House;
import com.xja.ssm.entity.Users;
import com.xja.ssm.mapper.UsersMapper;
import com.xja.ssm.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("usersService")
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    public void addUser(Users users) throws Exception {
        users.setIsadmin("false");
        usersMapper.insertSelective(users);
    }

    public Users selectByName(String name) throws Exception {
        return usersMapper.selectByName(name);
    }


}
